public class RunException {
    public static void main(String[] args) {
/*        try {
            fun(300);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }*/

            fun(300);


    }
    public static void fun(int age){
        if (age>0 && age < 200){
            System.out.println(age);
        }else {
            System.out.println("输入不合法");
          throw  new AgeAbnormalities("The age you entered is not legal");
        }
    }
}
//    public static void main(String[] args) {
//        int[] arr = new int[]{1,2,3,4};
//        System.out.println(arr[8]);
//    }
//}
